<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>递归</title>
</head>
<body>
        <script>
            function foo(num) {

                  console.log(num);
                if(num<100){
                    foo(++num)
              }
            }
            foo(1);                             //递归 1 到100
        </script>
</body>
</html>